/**
 * 206. 反转链表
 * https://leetcode.cn/problems/reverse-linked-list/description/
 */

//class Solution3 {
//    public ListNode reverseList(ListNode head) {
//        ListNode newHead = new ListNode();
//
//        while(head != null) {
//            ListNode next = head.next;
//            head.next = newHead.next;
//            newHead.next = head;
//            head = next;
//        }
//
//        return newHead.next;
//    }
//}